package com.example.dayu521.sg_oss.service.feign;

import com.example.dayu521.sg_oss.domain.donain_mid.CartParam;
import com.example.dayu521.sg_oss.domain.donain_mid.CartProduct;
import org.example.dayu521.OrRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

//因为这个接口是事务接口,所以不让他重试.默认情况下就是
// Retryer.NEVER_RETRY,即不重试,调用失败直接把异常重新抛出
// https://docs.spring.io/spring-cloud-openfeign/docs/current/reference/html/#spring-cloud-feign-overriding-defaults
@FeignClient("f1/cart")
public interface CartService {

    @PostMapping("/pid_list")
    OrRes<List<Long>> pid_list(@RequestBody Map<String,Object> param);

    @PostMapping("/cart_state")
    OrRes<?> cart_state(CartParam cartParam);
}
